package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.TemplateRightsEntity;
import com.dragon.modules.yuegou.enums.member.TemplateRightsRightsType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 会员卡等级权益关联表 动态查询条件
 *
 * @author pbuilder generated
 * @date 2021-12-16 20:15:21
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class TemplateRightsQuery extends TemplateRightsEntity implements Query<TemplateRightsEntity> {

	private static final long serialVersionUID = 1L;


	/** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

	/** 会员卡模板设置id查询条件 */
	@JsonUnwrapped(prefix = "templateSetId")
	private Condition<String> templateSetIdCondition;

	/** 会员卡等级设置id查询条件 */
	@JsonUnwrapped(prefix = "templateGradeId")
	private Condition<String> templateGradeIdCondition;

	/** [枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件 */
	@JsonUnwrapped(prefix = "rightsType")
	private Condition<TemplateRightsRightsType> rightsTypeCondition;

	/** 会员卡折扣积分权益id查询条件 */
	@JsonUnwrapped(prefix = "memRightsId")
	private Condition<String> memRightsIdCondition;

	/** 会员卡折扣积分权益名称查询条件 */
	@JsonUnwrapped(prefix = "memRightsName")
	private Condition<String> memRightsNameCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public TemplateRightsQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 *
	 * @param entity 实体对象
	 */
	public TemplateRightsQuery(TemplateRightsEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 *
	 * @param other 查询条件对象
	 */
	public TemplateRightsQuery(TemplateRightsQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.templateSetIdCondition != null) {
			this.templateSetIdCondition = other.templateSetIdCondition.copy();
		}
		if(other.templateGradeIdCondition != null) {
			this.templateGradeIdCondition = other.templateGradeIdCondition.copy();
		}
		if(other.rightsTypeCondition != null) {
			this.rightsTypeCondition = other.rightsTypeCondition.copy();
		}
		if(other.memRightsIdCondition != null) {
			this.memRightsIdCondition = other.memRightsIdCondition.copy();
		}
		if(other.memRightsNameCondition != null) {
			this.memRightsNameCondition = other.memRightsNameCondition.copy();
		}
	}

	@Override
	public QueryWrapper<TemplateRightsEntity> toQueryWrapper() {
		QueryWrapper<TemplateRightsEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (templateSetIdCondition != null) {
			templateSetIdCondition.toWrapper(wrapper, COL_TEMPLATE_SET_ID);
		}
		if (templateGradeIdCondition != null) {
			templateGradeIdCondition.toWrapper(wrapper, COL_TEMPLATE_GRADE_ID);
		}
		if (rightsTypeCondition != null) {
			rightsTypeCondition.toWrapper(wrapper, COL_RIGHTS_TYPE);
		}
		if (memRightsIdCondition != null) {
			memRightsIdCondition.toWrapper(wrapper, COL_MEM_RIGHTS_ID);
		}
		if (memRightsNameCondition != null) {
			memRightsNameCondition.toWrapper(wrapper, COL_MEM_RIGHTS_NAME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 *
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}

	/**
	 * 获取主键查询条件
	 *
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 *
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员卡模板设置id查询条件
	 *
	 * @return templateSetIdCondition 会员卡模板设置id查询条件
	 */
	public Condition<String> templateSetId() {
		this.templateSetIdCondition = new Condition<>();
		return this.templateSetIdCondition;
	}

	/**
	 * 获取会员卡模板设置id查询条件
	 *
	 * @return templateSetIdCondition 会员卡模板设置id查询条件
	 */
	public Condition<String> getTemplateSetIdCondition() {
		return templateSetIdCondition;
	}

	/**
	 * 设置会员卡模板设置id查询条件
	 *
	 * @param templateSetIdCondition 会员卡模板设置id查询条件
	 */
	public void setTemplateSetIdCondition(Condition<String> templateSetIdCondition) {
		this.templateSetIdCondition = templateSetIdCondition;
	}

	/**
	 * 构造并返回会员卡等级设置id查询条件
	 *
	 * @return templateGradeIdCondition 会员卡等级设置id查询条件
	 */
	public Condition<String> templateGradeId() {
		this.templateGradeIdCondition = new Condition<>();
		return this.templateGradeIdCondition;
	}

	/**
	 * 获取会员卡等级设置id查询条件
	 *
	 * @return templateGradeIdCondition 会员卡等级设置id查询条件
	 */
	public Condition<String> getTemplateGradeIdCondition() {
		return templateGradeIdCondition;
	}

	/**
	 * 设置会员卡等级设置id查询条件
	 *
	 * @param templateGradeIdCondition 会员卡等级设置id查询条件
	 */
	public void setTemplateGradeIdCondition(Condition<String> templateGradeIdCondition) {
		this.templateGradeIdCondition = templateGradeIdCondition;
	}

	/**
	 * 构造并返回[枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件
	 *
	 * @return rightsTypeCondition [枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件
	 */
	public Condition<TemplateRightsRightsType> rightsType() {
		this.rightsTypeCondition = new Condition<>();
		return this.rightsTypeCondition;
	}

	/**
	 * 获取[枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件
	 *
	 * @return rightsTypeCondition [枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件
	 */
	public Condition<TemplateRightsRightsType> getRightsTypeCondition() {
		return rightsTypeCondition;
	}

	/**
	 * 设置[枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件
	 *
	 * @param rightsTypeCondition [枚举]会员权益类型：0-商品折扣-DISCOUNT、1-多倍积分-SCORE查询条件
	 */
	public void setRightsTypeCondition(Condition<TemplateRightsRightsType> rightsTypeCondition) {
		this.rightsTypeCondition = rightsTypeCondition;
	}

	/**
	 * 构造并返回会员卡折扣积分权益id查询条件
	 *
	 * @return memRightsIdCondition 会员卡折扣积分权益id查询条件
	 */
	public Condition<String> memRightsId() {
		this.memRightsIdCondition = new Condition<>();
		return this.memRightsIdCondition;
	}

	/**
	 * 获取会员卡折扣积分权益id查询条件
	 *
	 * @return memRightsIdCondition 会员卡折扣积分权益id查询条件
	 */
	public Condition<String> getMemRightsIdCondition() {
		return memRightsIdCondition;
	}

	/**
	 * 设置会员卡折扣积分权益id查询条件
	 *
	 * @param memRightsIdCondition 会员卡折扣积分权益id查询条件
	 */
	public void setMemRightsIdCondition(Condition<String> memRightsIdCondition) {
		this.memRightsIdCondition = memRightsIdCondition;
	}

	/**
	 * 构造并返回会员卡折扣积分权益名称查询条件
	 *
	 * @return memRightsNameCondition 会员卡折扣积分权益名称查询条件
	 */
	public Condition<String> memRightsName() {
		this.memRightsNameCondition = new Condition<>();
		return this.memRightsNameCondition;
	}

	/**
	 * 获取会员卡折扣积分权益名称查询条件
	 *
	 * @return memRightsNameCondition 会员卡折扣积分权益名称查询条件
	 */
	public Condition<String> getMemRightsNameCondition() {
		return memRightsNameCondition;
	}

	/**
	 * 设置会员卡折扣积分权益名称查询条件
	 *
	 * @param memRightsNameCondition 会员卡折扣积分权益名称查询条件
	 */
	public void setMemRightsNameCondition(Condition<String> memRightsNameCondition) {
		this.memRightsNameCondition = memRightsNameCondition;
	}

}
